package com.usian.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.usian.mapper.PostMapper;
import com.usian.pojos.Post;
import com.usian.service.PostService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PostServiceImpl extends ServiceImpl<PostMapper, Post> implements PostService {


    @Override
    public List<Post> findPost() {

        List<Post> list = list();

        return list;
    }

    @Override
    public void addPost(Post post) {

        save(post);
    }

    @Override
    public void updatePost(Post post) {

        updateById(post);
    }

    @Override
    public void delPost(Integer id) {

        removeById(id);
    }
}
